home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / program / slix0987.zip / GMUTILS.ZIP / CRSPR.BAT < prev    next >
DOS Batch File  |  1995-06-11  |  2KB  |  74 lines

  1. @REM    CRSPR (Create Sprites) - a batch by Petri Hassinen 11th June, 1995
  2.  
  3. @ECHO OFF
  4. IF (%5) == () GOTO howto
  5. IF EXIST %5 GOTO texists
  6.  
  7. REM Processing starts here...
  8.  
  9. ECHO CRSPR: Initiating PPFIX sequence...
  10. papa ppfix %1 -raw
  11. IF ERRORLEVEL 1 goto error2
  12. ECHO CRSPR: Deleting unnecessary .PAL files...
  13. del *.pal
  14. ECHO CRSPR: Initiating FILECROP sequence...
  15. papa filecrop *.raw /%2
  16. IF ERRORLEVEL 1 goto error
  17. ECHO CRSPR: Deleting unnecessary .RAW files...
  18. del *.raw
  19. ECHO CRSPR: Initiating BOXCR sequence...
  20. papa /'N' boxcr *.trn /%3 /%4 /1
  21. IF ERRORLEVEL 1 goto error
  22. ECHO CRSPR: Deleting unnecessary .TRN files...
  23. del *.trn
  24. ECHO CRSPR: Compiling the sprite data components...
  25. copy /B *.raw %5
  26. ECHO CRSPR: Deleting unnecessary .RAW files...
  27. del *.raw
  28. ECHO.
  29. ECHO CRSPR: Everything OK!
  30. ECHO.
  31. GOTO end
  32.  
  33. :howto
  34. ECHO Usage :  CRSPR  still_files  starting_address  xsize  ysize  sprite_name
  35. ECHO.
  36. ECHO 'still_files' are the original picture files from which the resulting sprite
  37. ECHO data is generated. You can use wildcards (*, ?) in this argument.
  38. ECHO 'starting_address' specifies the sprite's starting position in the picture.
  39. ECHO 'xsize' and 'ysize' tell the size of the sprite in pixels.
  40. ECHO 'sprite_name' is the name you want to give to your sprite data.
  41. ECHO.
  42. ECHO See also CRSPR.LBM (e.g. PPFIX crspr.lbm) for more help on how to calculate
  43. ECHO 'starting_address'.
  44. ECHO.
  45. ECHO NOTE! 
  46. ECHO You should use this batch only in a temporary directory where there are no 
  47. ECHO files with extensions .RAW, .PAL, .TRN. This is because CRSPR deletes 
  48. ECHO intermediate files with these extensions to save disk space. If you have no
  49. ECHO such files you can use this batch where you like.
  50. ECHO.
  51. ECHO This also means that your original files (still_files) from which the sprites 
  52. ECHO are generated should be LBM files. If they are not, you can convert them into
  53. ECHO LBMs prior to generating sprites by typing:
  54. ECHO PAPA /'Y' PPFIX *.raw /lbm
  55. ECHO.
  56. GOTO end
  57.  
  58. :texists
  59. ECHO CRSPR: Target already exists, please specify a new target with another name.
  60. ECHO.
  61. GOTO end
  62.  
  63. :error
  64. ECHO CRSPR: Deleting temporary files (*.RAW, *.TRN)...
  65. del *.raw
  66. del *.trn
  67. :error2
  68. ECHO CRSPR: Error detected, batch terminated!
  69. ECHO.
  70.  
  71. :end
  72.  
  73. REM End of CRSPR.BAT
  74.